package model

import (
	"time"
)

type Monitor struct {
	Id              int       `json:"id"`
	Temperature     float32   `json:"temperature"`
	Info            string    `json:"info"`
	CreateTime      time.Time `json:"create_time"`
	UpdateTime      time.Time `json:"update_time"`
	Importancelever int       `json:"importancelever"`
	DeleteFlag      int       `json:"delete_flag"`
	Version         int       `json:"version"`
}

func NewMonitor(id int, temperature float32, info string, importancelever int) *Monitor {
	return &Monitor{Id: id, Temperature: temperature, Info: info, CreateTime: time.Now(), UpdateTime: time.Now(), Importancelever: importancelever}
}
